const http = uni.$u.http
// 订单查询s查询
export const getOrder = (data, config = { }) => 
	http.get('/order/myOrder/orderList', Object.assign({ }, config, 
		{
			params: data,
		}))

// export const getOrder = (params, config = {}) => {
//   return http.get('/order/myOrder/orderList', {
//     ...config,
//     params: { // 参数需要对应后端DTO字段
//       userId: params.userId,
//       // 可以添加其他查询参数
//     }
//   })
// }
//修改订单状态
export const getQuOrder = (data, config = { }) => 
	http.get('/order/myOrder/quOrder', Object.assign({ }, config, 
		{
			params: data,
		}))


//创建订单
export const getCreateOrder = (data, config = { }) => 
	http.get('/order/myOrder/createOrder', Object.assign({ }, config, 
		{
			params: data,
		}))
//删除订单
export const getDelOrder = (data, config = { }) => 
	http.get('/order/myOrder/delOrder', Object.assign({ }, config, 
		{
			params: data,
		}))

//新增评论
export const getComments = (data, config = { }) => 
	http.get('/index/comment/addComment', Object.assign({ }, config, 
		{
			params: data,
		}))
//退款时操作
export const getRefund = (params, config = {}) => 
  http.get('/order/myOrder/addRefund', {
    ...config,
    params  // 直接传递平铺参数
  })